#!/usr/bin/env python
import  random
class Randomint:
    def __init__(self,nu,star,end):
        self.nu=nu
        self.star=star
        self.end=end

    def randomsc(self):
        return [random.randint(self.star,self.end) for i in range(self.nu)]

f=Randomint(20,1,100)
#print(f.randomsc())

for i in range(10):
    print(tuple(random.sample(f.randomsc(), k=2)))


#优化

import  random
class Randomint:
    def __init__(self,nu,star,end):
        self.nu=nu
        self.star=star
        self.end=end

    def randomsc(self):
        return [random.randint(self.star,self.end) for i in range(self.nu)]

    def getzb(self):
        for i in range(10):
            print(tuple(random.sample(self.randomsc(), k=2)))

f=Randomint(20,1,100)
print(f.randomsc())
print(f.getzb())



# 做得不错














